/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.wlhy.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.msk.common.utils.DictUtils;
import com.msk.sys.domain.DataEntity;
import com.msk.sys.domain.Office;
import com.msk.sys.domain.User;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * <p>[]</p>
 * <p>作者：shic</p>
 * <p>邮箱：shic@xiangyou.com</p>
 * <p>创建时间： 2019-03-29 </p>
 * <p>类说明：承运商管理Entity </p>
 * <p>修改记录：</p>
 */
public class HtSupplier extends DataEntity<HtSupplier> {

	private static final long serialVersionUID = 1L;
	private String supCode;
	private String name;
	private String site;
	
	private String supplierId;

	public String getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId;
	}

	private String siteName;

	private String phone;

	private String remark;

	private String type;
	private Office company;
    public Office getCompany() {
		return company;
	}

	public void setCompany(Office company) {
		this.company = company;
	}

	private Office office;

	private String companyId;

	private String attribute01;

	private String attribute02;

	private String attribute03;

	private String attribute04;

	private String attribute05;

	private String attribute06;

	private Date attribute07;

	private Date attribute08;
	private String typeAlias;		// 转换后的承运商类型
	private String delFlagAlias;		// 转换后的删除标志

	private String roadTransportBizLicenseNo;  //道路运输许可证编号

	private String unifiedSocialCode; // 统一社会信用代码或身份证号
	private String updateIp;
	private String legalName;
	private String	legalPhone;
	private String contactsName;
	private String	contactsPhone;
	private String detailAddress;
	private String baseAccountName;
	private String baseAccountNo;
	private String baseAccountType;
	private String	baseAccountBankAddr;

	private String auditStatus;  // 0 未审核   1 通过   2驳回
	private User auditUser;
	private String auditUserName;
	private String auditContent;
    private String auditStatusAlias; // 转换后的审核状态

    private String bizLicense; //企业营业执照

	private String roadTransportLicense; //道路运输经营许可证编号
	private String recentAchieve; //近三年业绩
	private String entryLicense; //开户许可证
	private String legalIdCard;  //法人身份证
	private String approveFile; //批复附件

    private String userId;

    private String taxAuthorities;
	private String spArea;
	private int businessType;
	private String businessTypeAlias; //业务类型别名
	private String legalIdCardNo;

    private String legalIdCardBack;
	private String letterAttorney;
	private String generalTaxpayer;//一般纳税人
	private String openId;//微信公众号openId
	private User user;//当前用户

	//按照时间搜索
	private String createDate1;
	private String createDate2;
	private Date auditTime;//审核时间
	private String auditTime0;
	private String auditTime1;

	private String supplierPhone;//承运商电话
	/**
	 * 部分导出使用
	 */
	private String[] idArray;
    public HtSupplier() {
		super();
	}

	public HtSupplier(String id){
		super(id);
	}

	@Length(min=1, max=100, message="承运商编码长度必须介于 1 和 100 之间")
	public String getSupCode() {
		return supCode;
	}

	public void setSupCode(String supCode) {
		this.supCode = supCode;
	}

	@Length(min=1, max=100, message="承运商名称长度必须介于 1 和 100 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Length(min=1, max=255, message="承运商地址长度必须介于 1 和 255 之间")
	public String getSite() {
		return site;
	}

	public void setSite(String site) {
		this.site = site;
	}

	public String getSiteName() {
		return siteName;
	}

	public void setSiteName(String siteName) {
		this.siteName = siteName;
	}

	@Length(min=1, max=255, message="承运商电话长度必须介于 1 和 255 之间")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Length(min=0, max=255, message="备注长度必须介于 0 和 255 之间")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Length(min=0, max=100, message="承运商类型长度必须介于 0 和 100 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}

	@Length(min=0, max=64, message="公司ID长度必须介于 0 和 64 之间")
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	@Length(min=0, max=255, message="attribute01长度必须介于 0 和 255 之间")
	public String getAttribute01() {
		return attribute01;
	}

	public void setAttribute01(String attribute01) {
		this.attribute01 = attribute01;
	}

	@Length(min=0, max=255, message="attribute02长度必须介于 0 和 255 之间")
	public String getAttribute02() {
		return attribute02;
	}

	public void setAttribute02(String attribute02) {
		this.attribute02 = attribute02;
	}

	@Length(min=0, max=255, message="attribute03长度必须介于 0 和 255 之间")
	public String getAttribute03() {
		return attribute03;
	}

	public void setAttribute03(String attribute03) {
		this.attribute03 = attribute03;
	}

	@Length(min=0, max=255, message="attribute04长度必须介于 0 和 255 之间")
	public String getAttribute04() {
		return attribute04;
	}

	public void setAttribute04(String attribute04) {
		this.attribute04 = attribute04;
	}

	@Length(min=0, max=255, message="attribute05长度必须介于 0 和 255 之间")
	public String getAttribute05() {
		return attribute05;
	}

	public void setAttribute05(String attribute05) {
		this.attribute05 = attribute05;
	}

	@Length(min=0, max=255, message="attribute06长度必须介于 0 和 255 之间")
	public String getAttribute06() {
		return attribute06;
	}

	public void setAttribute06(String attribute06) {
		this.attribute06 = attribute06;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttribute07() {
		return attribute07;
	}

	public void setAttribute07(Date attribute07) {
		this.attribute07 = attribute07;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttribute08() {
		return attribute08;
	}

	public void setAttribute08(Date attribute08) {
		this.attribute08 = attribute08;
	}


	public String getTypeAlias() {
		if(StringUtils.isBlank(typeAlias)){
			return DictUtils.getDictLabel(type, "", "");
		}
		return typeAlias;
	}

	public void setTypeAlias(String typeAlias) {
		this.typeAlias = typeAlias;
	}
	public String getDelFlagAlias() {
		if(StringUtils.isBlank(delFlagAlias)){
			return DictUtils.getDictLabel(delFlag, "del_flag", "");
		}
		return delFlagAlias;
	}

	public void setDelFlagAlias(String delFlagAlias) {
		this.delFlagAlias = delFlagAlias;
	}

	public String getLogTitle() {
		return "承运商管理";
	}

	public String getRoadTransportBizLicenseNo() {
		return roadTransportBizLicenseNo;
	}

	public void setRoadTransportBizLicenseNo(String roadTransportBizLicenseNo) {
		this.roadTransportBizLicenseNo = roadTransportBizLicenseNo;
	}

	public String getUnifiedSocialCode() {
		return unifiedSocialCode;
	}

	public void setUnifiedSocialCode(String unifiedSocialCode) {
		this.unifiedSocialCode = unifiedSocialCode;
	}

	public String getLegalName() {
		return legalName;
	}

	public void setLegalName(String legalName) {
		this.legalName = legalName;
	}

	public String getUpdateIp() {
		return updateIp;
	}

	public void setUpdateIp(String updateIp) {
		this.updateIp = updateIp;
	}

	public String getLegalPhone() {
		return legalPhone;
	}

	public void setLegalPhone(String legalPhone) {
		this.legalPhone = legalPhone;
	}

	public String getContactsName() {
		return contactsName;
	}

	public void setContactsName(String contactsName) {
		this.contactsName = contactsName;
	}

	public String getContactsPhone() {
		return contactsPhone;
	}

	public void setContactsPhone(String contactsPhone) {
		this.contactsPhone = contactsPhone;
	}


	public String getDetailAddress() {
		return detailAddress;
	}

	public void setDetailAddress(String detailAddress) {
		this.detailAddress = detailAddress;
	}

	public String getBaseAccountName() {
		return baseAccountName;
	}

	public void setBaseAccountName(String baseAccountName) {
		this.baseAccountName = baseAccountName;
	}

	public String getBaseAccountNo() {
		return baseAccountNo;
	}

	public void setBaseAccountNo(String baseAccountNo) {
		this.baseAccountNo = baseAccountNo;
	}

	public String getBaseAccountType() {
		return baseAccountType;
	}

	public void setBaseAccountType(String baseAccountType) {
		this.baseAccountType = baseAccountType;
	}

	public String getBaseAccountBankAddr() {
		return baseAccountBankAddr;
	}

	public void setBaseAccountBankAddr(String baseAccountBankAddr) {
		this.baseAccountBankAddr = baseAccountBankAddr;
	}

	public String getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(String auditStatus) {
		this.auditStatus = auditStatus;
	}

	public User getAuditUser() {
		return auditUser;
	}

	public void setAuditUser(User auditUser) {
		this.auditUser = auditUser;
	}

	public String getAuditContent() {
		return auditContent;
	}

	public void setAuditContent(String auditContent) {
		this.auditContent = auditContent;
	}

    public void setAuditStatusAlias(String auditStatusAlias) {
        this.auditStatusAlias = auditStatusAlias;
    }

    public String getAuditStatusAlias() {
        if (StringUtils.isBlank(auditStatusAlias)) {
            return DictUtils.getDictLabel(auditStatus, "base_audit_status", "");
        }
        return auditStatusAlias;
    }

	public String getBizLicense() {
        return bizLicense;
    }

    public void setBizLicense(String bizLicense) {
        this.bizLicense = bizLicense;
    }

	public String getRoadTransportLicense() {
		return roadTransportLicense;
	}

	public void setRoadTransportLicense(String roadTransportLicense) {
		this.roadTransportLicense = roadTransportLicense;
	}

	public String getRecentAchieve() {
		return recentAchieve;
	}

	public void setRecentAchieve(String recentAchieve) {
		this.recentAchieve = recentAchieve;
	}

	public String getEntryLicense() {
		return entryLicense;
	}

	public void setEntryLicense(String entryLicense) {
		this.entryLicense = entryLicense;
	}

	public String getLegalIdCard() {
		return legalIdCard;
	}

	public void setLegalIdCard(String legalIdCard) {
		this.legalIdCard = legalIdCard;
	}

	public String getApproveFile() {
		return approveFile;
	}

	public void setApproveFile(String approveFile) {
		this.approveFile = approveFile;
	}

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

	public String getTaxAuthorities() {
		return taxAuthorities;
	}

	public void setTaxAuthorities(String taxAuthorities) {
		this.taxAuthorities = taxAuthorities;
	}

	public String getSpArea() {
		return spArea;
	}

	public void setSpArea(String spArea) {
		this.spArea = spArea;
	}

	public int getBusinessType() {
		return businessType;
	}

	public void setBusinessType( int businessType) {
		this.businessType = businessType;
	}

	public String getBusinessTypeAlias() {
		return businessTypeAlias;
	}

	public void setBusinessTypeAlias(String businessTypeAlias) {
		this.businessTypeAlias = businessTypeAlias;
	}

	public String getLegalIdCardNo() {
		return legalIdCardNo;
	}

	public void setLegalIdCardNo(String legalIdCardNo) {
		this.legalIdCardNo = legalIdCardNo;
	}

	public String getLegalIdCardBack() {
		return legalIdCardBack;
	}

	public void setLegalIdCardBack(String legalIdCardBack) {
		this.legalIdCardBack = legalIdCardBack;
	}

	public String getLetterAttorney() {
		return letterAttorney;
	}

	public void setLetterAttorney(String letterAttorney) {
		this.letterAttorney = letterAttorney;
	}

	public String getGeneralTaxpayer() {
		return generalTaxpayer;
	}

	public void setGeneralTaxpayer(String generalTaxpayer) {
		this.generalTaxpayer = generalTaxpayer;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getCreateDate1() {
		return createDate1;
	}

	public void setCreateDate1(String createDate1) {
		this.createDate1 = createDate1;
	}

	public String getCreateDate2() {
		return createDate2;
	}

	public void setCreateDate2(String createDate2) {
		this.createDate2 = createDate2;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAuditTime() {
		return auditTime;
	}

	public void setAuditTime(Date auditTime) {
		this.auditTime = auditTime;
	}

	public String getAuditTime0() {
		return auditTime0;
	}

	public void setAuditTime0(String auditTime0) {
		this.auditTime0 = auditTime0;
	}

	public String getAuditTime1() {
		return auditTime1;
	}

	public void setAuditTime1(String auditTime1) {
		this.auditTime1 = auditTime1;
	}

	public String getAuditUserName() {
    	if(auditUser != null && StringUtils.isNotBlank(auditUser.getName())){
			return auditUser.getName();
		}
		return auditUserName;
	}

	public void setAuditUserName(String auditUserName) {
		this.auditUserName = auditUserName;
	}

	public void setIdArray(String[] idArray) {
		this.idArray = idArray;
	}

	public String[] getIdArray() {
		return idArray;
	}

	public String getSupplierPhone() {
		return supplierPhone;
	}

	public void setSupplierPhone(String supplierPhone) {
		this.supplierPhone = supplierPhone;
	}
}